//***********************************************************
//*
//* File:           Link.java
//* Author:         Abhinav Kamra
//* Contact:        kamra@cs.columbia.edu
//* Update:         10.03.2004
//*
//*
//***********************************************************

package paths;

import ui.Util;

    public final class Link
    {
	    public String src, dest, schedule;	    
	    public Link(String s) throws Exception
	    {
            String[] toks = Util.split(",\t ", s);

		    if(toks.length > 0) 
		    	src = toks[0];		    
		    else
		    	throw new Exception("Source missing");
		    if(toks.length > 1)
		    	dest = toks[1];
		    else
		    	throw new Exception("Destination missing");
		    if(toks.length > 2)
		    	schedule = toks[2];
	    }
    }

